package com.lmq;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) throws ParseException {

//        2014-04-07T13:58:37.446Z
        SimpleDateFormat format =  new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.ddd'Z'");
//        String time="2018-09-29 16:39:00";
        String time="2014-04-07T13:58:37.446Z";
        Date date = format.parse(time);
        //日期转时间戳（毫秒）
        long time1=date.getTime();
        System.out.print("Format To times:"+time1);
    }
}
